<!--src/views/dashboard/Unauthorized.vue-->
<template>
  <div class="unauthorized-container">
    <div class="error-content">
      <h1>403 未授权</h1>
      <p>抱歉，您没有权限访问此页面</p>
      <p>请联系管理员获取相应权限</p>
      <el-button type="primary" @click="goHome">返回首页</el-button>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()
const goHome = () => router.push('/dashboard')
</script>

<style scoped>
.unauthorized-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f5f7fa;
}

.error-content {
  text-align: center;
  max-width: 600px;
  padding: 30px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

h1 {
  color: #f56c6c;
  font-size: 40px;
  margin-bottom: 20px;
}

p {
  font-size: 18px;
  color: #606266;
  margin-bottom: 10px;
}

.el-button {
  margin-top: 20px;
}
</style>